<?php
/* @var $this MstMarketingController */
/* @var $model MstMarketing */


$this->breadcrumbs=array(
	'Mst Marketings'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List MstMarketing', 'url'=>array('index')),
	array('label'=>'Create MstMarketing', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#mst-marketing-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<!--<h1>Manage Nota Debet/Kredit Medical</h1>-->
<h1> Marketing</h1>


<a href="<?php echo Yii::app()->createUrl('mstMarketing/create'); ?>" class="btn btn-sm btn-primary">Add New</a><br /><br />


<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'mst-marketing-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		'id',
		'name',
		array(
			'name'=>'mst_cabang_id',
			'value'=>'$data->mst_cabang_id==1? Jakarta : Medan',
			),
		array(
                'class'=>'bootstrap.widgets.TBButtonColumn',
               'template' => '{view}{update}{delete}',
               'buttons' => array(
               				'view' => array(
								'options'=>array(
								'class'=>'btn btn-small view'
								)
                            ),

               				'update' => array(
								'options'=>array(
								'class'=>'btn btn-small update'
								)
                            ),


                            'delete' => array(
                              'options'=>array(
                                   'class'=>'btn btn-small delete'
                                   ),
                            ),

               ),
            'htmlOptions'=>array('style'=>'width: 150px'),
           )
	),
)); ?>